import {makeAutoObservable } from "mobx";
class Market {
    constructor(){
        makeAutoObservable(this, {}, {autoBind: true})
    }
    //选中行的key值
    selectRowKeys=[];
    //设置选中行的key值
    setSelectRowKeys(values){
        this.selectRowKeys=values
    };

    setMemberTableList(arr){
        console.log(111,arr)
        this.count=arr
    }
    count = [{
        id:1,
        operationTime:"2018-02-15 15:12:35",
        operationName:"超级管理员",
        marketingType:"推送营销记录",
        marketingDetails:"向15位标签为'土豪'的会员推送了优惠名称",
        status:"推送中"
    },
        {
            id:2,
            operationTime:"2018-02-15 15:12:35",
            operationName:"运营人员1号",
            marketingType:"调整积分",
            marketingDetails:"给3为会员增加了500积分",
            status:"已完成"
        },
        {
            id:3,
            operationTime:"2018-02-15 15:12:35",
            operationName:"超级管理员",
            marketingType:"推送营销记录",
            marketingDetails:"向会员'135-8888-9999'推送了'优惠名称'",
            status:"待执行"
        },
        {
            id:4,
            operationTime:"2018-02-15 15:12:35",
            operationName:"运营人员1号",
            marketingType:"推送营销记录",
            marketingDetails:"向会员'135-8888-9999'增加了500积分",
            status:"待执行"
        },
        {
            id:5,
            operationTime:"2018-02-15 15:12:35",
            operationName:"运营人员1号",
            marketingType:"调整积分",
            marketingDetails:"给3为会员增加了500积分",
            status:"已完成"
        },
        {
            id:6,
            operationTime:"2018-02-15 15:12:35",
            operationName:"运营人员1号",
            marketingType:"调整积分",
            marketingDetails:"给3为会员增加了500积分",
            status:"已完成"
        },
    ];
    chaxun=[
        {
            id:1,
            operationTime:"2018-02-15 15:12:35",
            operationName:"超级管理员",
            marketingType:"推送营销记录",
            marketingDetails:"向15位标签为'土豪'的会员推送了优惠名称",
            status:"推送中"
        },
        {
            id:2,
            operationTime:"2018-02-15 15:12:35",
            operationName:"运营人员1号",
            marketingType:"调整积分",
            marketingDetails:"给3为会员增加了500积分",
            status:"已完成"
        },
        {
            id:3,
            operationTime:"2018-02-15 15:12:35",
            operationName:"超级管理员",
            marketingType:"推送营销记录",
            marketingDetails:"向会员'135-8888-9999'推送了'优惠名称'",
            status:"待执行"
        },
        {
            id:4,
            operationTime:"2018-02-15 15:12:35",
            operationName:"运营人员1号",
            marketingType:"推送营销记录",
            marketingDetails:"向会员'135-8888-9999'增加了500积分",
            status:"待执行"
        },
        {
            id:5,
            operationTime:"2018-02-15 15:12:35",
            operationName:"运营人员1号",
            marketingType:"调整积分",
            marketingDetails:"给3为会员增加了500积分",
            status:"已完成"
        },
        {
            id:6,
            operationTime:"2018-02-15 15:12:35",
            operationName:"运营人员1号",
            marketingType:"调整积分",
            marketingDetails:"给3为会员增加了500积分",
            status:"已完成"
        },
    ];
    // async deleteMarketing(target) {//批量删除商品
    //     target.forEach(el => {
    //         this.goods = this.count = this.count.filter(i => {
    //             return i.id !== el.id
    //         })
    //     })
    //     // console.log(target);
    // }
    resetlist(){
        this.count=this.chaxun
    }
}
const market = new Market()
export default  market